#ifndef __ALGORITHM_HPP__
#define __ALGORITHM_HPP__

#include "Block.hpp"

/**
 * virtual baseclass for different cryptographic algorithms
 */
class Algorithm {
	public:
		Algorithm() { }
		virtual ~Algorithm() { }

		/**
		 * encrypts given plaintext
		 * @param plaintext plaintext to encrypt
		 * @returns ciphertext
		 */
		virtual Block encrypt(const Block &plaintext) const = 0;

		/**
		 * decrypts given plaintext
		 * @param ciphertext ciphertext to encrypt
		 * @returns plaintext
		 */
		virtual Block decrypt(const Block &ciphertext) const = 0;

		/**
		 * @returns block size of algorithm in bytes
		 */
		virtual unsigned int getBlockSize() const = 0;
};
#endif

